<?php

namespace App\Api\Controllers\Pay;
use App\Api\Bases\CommonController;
use App\Api\Models\CmcOrderList;
use App\Api\Services\JsonService;
use App\Api\Services\Pay\Alipay;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\DB;
use Yansongda\Pay\Log;
use Yansongda\Pay\Pay;

class  Alicpay extends CommonController
{

    /*
     * 异步回调
     */
      public static function aliPayNotifyUrl(Request $request)
      {

        if ( empty($request->get('order_sn')) || empty($request->get('uid'))) {
            return JsonService::fail('请求类型错误', '', config('code.HTTP_FAIL'));
        }

        CmcOrderList::whereNotifyUrl($request->get('uid'),$request->get('order_sn'));

            return  JsonService::success('回调成功','',config('code.HTTP_OK'));
    }

}

